package com.hh.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hh.demo.entity.Bookinfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 吉吉国王
 * @since 2022-07-11
 */
@Mapper
public interface BookinfoMapper extends BaseMapper<Bookinfo> {
    @Select("select * from `bookinfo` where bookCard=#{bookCard}")
    Bookinfo queryBookInfo(String bookCard);

    @Insert("insert into `bookinfo`(`bookNo`,`bookName`,`author`,`bookCard`,`bookNum`) values (#{bookNo},#{bookName},#{author},#{bookCard},#{bookNum})")
    void insertBookInfo(String bookNo,String bookName,String author,String bookCard,Integer bookNum);
}
